add_executable(tst_graphicshelpergl2 WIN32 MACOSX_BUNDLE
    ../../core/common/testpostmanarbiter.cpp ../../core/common/testpostmanarbiter.h
    ../commons/testrenderer.cpp ../commons/testrenderer.h
    tst_graphicshelpergl2.cpp
)
target_include_directories(tst_graphicshelpergl2 PRIVATE
    ../../core/common
    ../commons
)

target_link_libraries(tst_graphicshelpergl2 PRIVATE
    Qt${QT_VERSION_MAJOR}::3DCore
    Qt${QT_VERSION_MAJOR}::3DCorePrivate
    Qt${QT_VERSION_MAJOR}::3DRender
    Qt${QT_VERSION_MAJOR}::3DRenderPrivate
    Qt${QT_VERSION_MAJOR}::Core
    Qt${QT_VERSION_MAJOR}::CorePrivate
    Qt${QT_VERSION_MAJOR}::Gui
    Qt${QT_VERSION_MAJOR}::Test
    openglextensions
)

if(QT_FEATURE_private_tests)
    target_sources(tst_graphicshelpergl2 PUBLIC
        ../../core/common/qbackendnodetester.cpp ../../core/common/qbackendnodetester.h
    )
endif()

if(useCommonTestAspect)
    target_sources(tst_graphicshelpergl2 PUBLIC
        ../commons/testaspect.cpp ../commons/testaspect.h
    )
endif()

install(TARGETS tst_graphicshelpergl2
    BUNDLE DESTINATION .
    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)

# Consider using qt_generate_deploy_app_script() for app deployment if
# the project can use Qt 6.3. In that case rerun qmake2cmake with
# --min-qt-version=6.3.
